const { testModel } = require("../models/testModel");
const { knowledgePointsModel } = require("../models/knowledgePointsModel");

async function getTestTitle(req, res, next) {
    let { TypeId } = req.body;
    let title = await testModel.find({ TypeId:TypeId }).populate('KnowledgePointId');
    // console.log(title);
    res.send(title)

};
async function getPage(req, res, next) {
    let { KnowledgePointId,TypeId } = req.body;
    let title = await testModel.find({KnowledgePointId,TypeId})
    res.send(title)

};
module.exports = { getTestTitle,getPage}
